package com.xinxing.learning.statemachine.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xinxing.learning.statemachine.entity.Order;

import java.sql.SQLException;

public interface OrderService extends IService<Order> {
    /**
     * 创建订单
     *
     * @param order
     * @return
     */
    Order create(Order order) throws SQLException;

    /**
     * 对订单进行支付
     *
     * @param id
     * @return
     */
    Order pay(Long id);

    /**
     * 对订单进行发货
     *
     * @param id
     * @return
     */
    Order deliver(Long id);

    /**
     * 对订单进行确认收货
     *
     * @param id
     * @return
     */
    Order receive(Long id);

}
